<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>

    </h:head>
    <h:body>
        <ui:composition template="/template.xhtml">
            <ui:define name="title">#{bundle.mainPageTitle}</ui:define>
            <ui:define name="content">
                <h:form>
                    <h:commandLink action="institution/View" value="#{mainListSelection.institution.institutionName}" rendered="#{mainListSelection.institutionSelected and localeHelper.englishSet}" />
                    <h:commandLink action="institution/View" value="#{mainListSelection.institution.institutionNameNo}" rendered="#{mainListSelection.institutionSelected and localeHelper.norwegianSet}" />
                    <h:outputText value=" > " rendered="#{mainListSelection.facultySelected}" />
                    <h:commandLink action="faculty/View" value="#{mainListSelection.faculty.facultyName}" rendered="#{mainListSelection.facultySelected and localeHelper.englishSet}" />
                    <h:commandLink action="faculty/View" value="#{mainListSelection.faculty.facultyNameNo}" rendered="#{mainListSelection.facultySelected and localeHelper.norwegianSet}" />
                    <h:outputText value=" > " rendered="#{mainListSelection.studyProgramSelected}" />
                   <h:commandLink action="studyProgram/View" value="#{mainListSelection.studyProgram.studyProgramName}" rendered="#{mainListSelection.studyProgramSelected and localeHelper.englishSet}" />
                   <h:commandLink action="studyProgram/View" value="#{mainListSelection.studyProgram.studyProgramNameNo}" rendered="#{mainListSelection.studyProgramSelected and localeHelper.norwegianSet}" />
                
                   </h:form>
                <h:form>
                    <h:dataTable value="#{institutionController.items}" var="institution" rendered="#{mainListSelection.renderInstitutionTable()}">
                        <h:column>
                            <h:commandLink value="#{institution.institutionName}" action="#{mainListSelection.selectInstitution()}" rendered="#{localeHelper.englishSet}" />
                            <h:commandLink value="#{institution.institutionNameNo}" action="#{mainListSelection.selectInstitution()}" rendered="#{localeHelper.norwegianSet}"/>
                        </h:column>
                    </h:dataTable>
                    <h:dataTable value="#{facultyController.items}" var="faculty" rendered="#{mainListSelection.renderFacultyTable()}">
                        <h:column>
                            <h:commandLink value="#{faculty.facultyName}" action="#{mainListSelection.selectFaculty()}" rendered="#{localeHelper.englishSet}" />
                            <h:commandLink value="#{faculty.facultyNameNo}" action="#{mainListSelection.selectFaculty()}" rendered="#{localeHelper.norwegianSet}"/>
                        </h:column>
                    </h:dataTable>
                    <h:dataTable value="#{studyProgramController.items}" var="studyProgram" rendered="#{mainListSelection.renderStudyProgramTable()}">
                        <h:column>
                            <h:commandLink value="#{studyProgram.studyProgramName}" action="#{mainListSelection.selectStudyProgram()}" rendered="#{localeHelper.englishSet}" />
                            <h:commandLink value="#{studyProgram.studyProgramNameNo}" action="#{mainListSelection.selectStudyProgram()}" rendered="#{localeHelper.norwegianSet}"/>
                        </h:column>
                    </h:dataTable>
                    <h:dataTable value="#{courseController.items}" var="course" rendered="#{mainListSelection.renderCourseTable()}">
                        <h:column>
                            <h:commandLink value="#{course.courseName}" action="#{courseController.prepareView}" rendered="#{localeHelper.englishSet}" />
                            <h:commandLink value="#{course.courseNameNo}" action="#{courseController.prepareView}" rendered="#{localeHelper.norwegianSet}" />
                        </h:column>
                    </h:dataTable>
                    <h:commandButton value="#{bundle.RESET}" action="#{mainListSelection.reset()}" />
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

